package org.grottarossa.template.drivers.components;

import org.grottarossa.template.drivers.DriverException;

import java.util.HashMap;
import java.util.Hashtable;
import java.util.List;

import org.grottarossa.template.data.DataType;
import org.grottarossa.template.data.DataTypeValue;
import org.grottarossa.template.data.pojo.history.HistoryList;
import org.grottarossa.template.data.pojo.query.Query;
import org.grottarossa.template.data.pojo.table.Cell;
import org.grottarossa.template.data.pojo.tasks.Task;
import org.grottarossa.template.data.pojo.tasks.TaskList;
import org.grottarossa.template.drivers.components.tokens.CaseManagementId;

/**
 *
 * La classe rappresenta l'interfaccia di Case Management di AeroFlow. L'interfaccia puo' essere implementata utilizzando qualsiasi tool di case management a patto che le API vengano tutte
 * rispettate nella loro implementazione.
 *
 * @author Marco Sabatini (sabatini.m@gmail.com)
 * @author Maurizio Farina (maurizio.farina@gmail.com)
* @author Marco Trischitta (marco.trischitta@gmail.com)
 * @version %I%, %G%
 * @since 1.0
 *
 *
 * */
public interface CaseManagement
{
	public TaskList getTaskList(CaseManagementId idObject) throws DriverException;
	public HistoryList getHistory(CaseManagementId idObject) throws DriverException;
	public void setTaskPercent(Task task) throws DriverException;
	public void updateTask(Task task) throws DriverException;
	public Query executeQuery(String queryS, HashMap<String, String> paramsMap) throws DriverException ;
	public Hashtable<String, String> enumQueriesScriptByCategory(String category, String applicationName) throws DriverException;

	public Hashtable<String, java.util.Hashtable<String,DataType>> getFieldCache();
	public Hashtable<String,DataType> getFieldsMapConverted();
	public Hashtable<String, DataType> getFields();

	public DataType resolveFieldValue(Cell cell) throws DriverException;
	public List<DataTypeValue> resolveEnumFieldValue(Cell cell) throws DriverException;
	public String getEnumCellValue(Cell cell) throws DriverException;
	public void skipTask(Task task) throws DriverException;



}